[defer-import-eval] fixing expectation for super property access#4999
Open
[defer-import-eval] fixing expectation for super property access#4999
Conversation
caiolima
added a commit
to caiolima/v8
that referenced
this pull request
Mar 20, 2026
…ects Object::SetSuperProperty was short-circuiting to TypeError when the OWN lookup on the receiver hit MODULE_NAMESPACE, skipping the [[GetOwnProperty]] call that OrdinarySetWithOwnDescriptor[1] requires per spec (step 2.c). This meant deferred module evaluation was not triggered and TDZ bindings incorrectly threw TypeError instead of ReferenceError. The fix replaces the MODULE_NAMESPACE case with a GetOwnPropertyDescriptor call that mirrors the existing INTERCEPTOR/JSPROXY path. This properly invokes the namespace's [[GetOwnProperty]], which: - Triggers deferred module evaluation for non-symbol-like string keys - Throws ReferenceError for uninitialized (TDZ) bindings - Returns a writable descriptor for initialized exports, falling through to DefineOwnProperty which rejects the value change (TypeError) Also marks two test262 tests as FAIL (ignore-super-property-set-exported and ignore-super-property-set-not-exported) whose expectations are incorrect per tc39/test262#4999. For a detailed flow on how spec flows to thse cases, see: tc39/test262#4980 [1] - https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR actually changes a couple of tests we have using
super.propthat are incorrect. They expect that a deferred module won't trigger, however they should trigger evaluation, because the execution path eventually calls[[GetOwnProperty]]on deferred namespaces.It closes #4980.